import java.io.*;
import java.util.*;
public class MyOD {
    public static void main(String[] args) throws FileNotFoundException {
        FileInputStream file = new FileInputStream("abc");
        DataInputStream data = new DataInputStream(file);
        FileOutputStream out1 = new FileOutputStream("abc");
        DataOutputStream out2 = new DataOutputStream(out1);
int temp ;
        try {
            while ( (temp = data.read()) != -1) {
                out2.write(temp);
            }
        }
        catch (IOException ex1) {
            ex1.printStackTrace();
        }

        finally{
            try {
                file.close();
                data.close();
                out1.close();
                out2.close();
            }
            catch (IOException ex2) {
                ex2.printStackTrace();
            }
        }
    }
}

